package entity;

public class Movie {
    private String movieId;
    private String name;
    private String director;
    private String stars;
    private String description;
    private int duration; // 时长（分钟）
    private double rating; // 评分（0-10）

    public Movie() {
    }

    public Movie(String movieId, String name, String director, String stars, String description, int duration, double rating) {
        this.movieId = movieId;
        this.name = name;
        this.director = director;
        this.stars = stars;
        this.description = description;
        this.duration = duration;
        this.rating = rating;
    }

    // Getter 和 Setter 方法
    public String getMovieId() {
        return movieId;
    }

    public void setMovieId(String movieId) {
        this.movieId = movieId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDirector() {
        return director;
    }

    public void setDirector(String director) {
        this.director = director;
    }

    public String getStars() {
        return stars;
    }

    public void setStars(String stars) {
        this.stars = stars;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getDuration() {
        return duration;
    }

    public void setDuration(int duration) {
        this.duration = duration;
    }

    public double getRating() {
        return rating;
    }

    public void setRating(double rating) {
        this.rating = rating;
    }

    @Override
    public String toString() {
        return "Movie{" +
                "movieId='" + movieId + '\'' +
                ", name='" + name + '\'' +
                ", director='" + director + '\'' +
                ", stars='" + stars + '\'' +
                ", description='" + description + '\'' +
                ", duration=" + duration +
                ", rating=" + rating +
                '}';
    }
}